package com.caizi.classload;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import javax.swing.JFrame;

public class ClassLoadTest {

}

class ClassLoadFrame extends JFrame {

    private static final long serialVersionUID = 1L;

    public void runClass(String name, String key) throws Exception {
        ClassLoader classLoader = new CryptoClassLoader(Integer.valueOf(key));
        Class c = classLoader.loadClass(name);
        Method m = c.getMethod("main", null);
        m.invoke(null, null);
    }
}
